# 导入Flask类
from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand

from info import create_app, db


app = create_app('development')
# 设置数据库迁移
manager = Manager(app)
# 将app与db关联
Migrate(app, db)
# 将迁移命令添加到manager中
manager.add_command('db', MigrateCommand)


# Flask应用程序实例的 run 方法 启动 WEB 服务器
if __name__ == '__main__':
    manager.run()
